package com.tstudy.laoshibang.db;

import java.util.List;
import java.util.Map;

public interface DBManager {
	
	public boolean insert(Object obj);
	public boolean insert(List<?> list);
	
	public boolean delete(Object obj);
	
	public boolean update(Object obj);
	public Object queryById(Object id);
	
	@SuppressWarnings("rawtypes")
	public List queryByField(String filedName,Object value);
	
	@SuppressWarnings("rawtypes")
	public List queryByFields(Map<String,Object> args);
	
	public Object queryByFieldFirst(String filedName,Object value);
	
	public Object queryByFieldsFirst(Map<String,Object> args);
	
	@SuppressWarnings("rawtypes")
	public List queryRaw(String query,String... args);
	
	@SuppressWarnings("rawtypes")
	public List queryAll();
	
	public int executeRaw(String sql,String... args);
	public int updateRaw(String sql,String... args);
	@SuppressWarnings("rawtypes")
	public List queryBuilderRaw(String order,boolean desc,String where,String whereValue);
}
